Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Telephony /
Chapter 6 - Telephone Tools / Telephone Tools Reference
Constants


Terminal Messages

This section describes the messages that a telephone tool can send to the Telephone Manager's terminal master message handler. These messages are relayed to any applications that have installed a terminal message handler. For all terminal messages, your tool passes the message type and any necessary additional information in the fields of a terminal message parameter block (page 6-61).

Note
See "Terminal Messages," beginning on page 5-9 for a description of how the terminal message type and additional information are passed to applications.
enum {
   telTermHookMsg          = 0x00000001,
   telTermKeyMsg           = 0x00000002,
   telTermVolMsg           = 0x00000004,
   telTermDisplayMsg       = 0x00000008,
   telTermEnableMsg        = 0x00000010,
   telTermOpenMsg          = 0x00000020,
   telTermCloseMsg         = 0x00000040,
   telTermResetMsg         = 0x00000080,
   telTermErrorMsg         = 0x00000100,
   telTermIndHSStateChgMsg = 0x00000200,
   telTermIndHSConnectMsg  = 0x00000400,
   telTermKeyImmMsg        = 0x00000800,
   telTermVolStateMsg      = 0x00001000,
   telTermOtherMsg         = 0x80000000
};
Constant descriptions

telTermHookMsg
Your tool sends this message when a hookswitch state associated with a terminal has changed (either because an application called TELSetHookSw or because the telephone was physically placed on or off hook). The mtype field is a constant that indicates the type of hookswitch. The value field is a constant that indicates whether the hookswitch state is on or off. See "Hookswitch Types and States" on page 2-11 for a description of the constants you can pass in these fields.
telTermKeyMsg
Your tool sends this message when a key on an attached telephone set (either on the telephone pad or a feature key) has been pressed. This message is queued and then sent to the application's message handler at system task time. The mtype field is a constant indicating which kind of key was pressed. The value field is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of the constants you can pass in these fields.
telTermVolMsg
Your tool sends this message when a speaker volume level or a microphone sensitivity level has been adjusted for a given terminal (either because an application called TELSetVolume or TELAlert to modify the level, or because a user manually changed a volume setting on the telephone handset). The mtype field is a constant that indicates which volume or sensitivity has been set. The value field is constant that indicates the new level. This field is equal to telVolSame if the level has not been changed, or can have any value from telVolMin to telVolMax. See "Volume Controls" on page 2-12 for a description of the constants you can pass in these fields.
telTermDisplayMsg
Your tool sends this message when the display on the telephone terminal has changed. The mtype field is a constant that indicates the current display mode. The value field is constant that indicates which item in the display has changed. See "Display Modes" on page 2-10 and "Display Items" on page 2-10 for a description of the constants you can pass in these fields.
telTermEnableMsg
Your tool sends this message whenever the enabled state of a terminal changes. The mtype field is not used and should be set to 0. The value field is a constant that indicates the state of the connection between your tool and a terminal. See "Terminal States" on page 5-26 for a description of the constants you can pass in this field.
telTermOpenMsg
Your tool sends this message when a terminal is successfully opened in response to the TELOpenTerm function. The mtype and value fields are not used and should be set to 0.
telTermCloseMsg
Your tool sends this message when a terminal is shut down in response to the TELCloseTerm function. The mtype and value fields are not used and should be set to 0.
telTermResetMsg
Your tool sends this message when a terminal has been reset in response to the TELResetTerm function. The mtype and value fields are not used and should be set to 0.
telTermErrorMsg
Your tool sends this message when a terminal hardware related error has occurred. The mtype and value fields are not used and should be set to 0. Note that this message tells the application only that some error has occurred; it does not specify the exact error. To do that, use the telOtherMsg message.
telTermIndHSStateChgMsg
Your tool sends this message when there is a change in the independent handset state (either because your application called TELIndHandsetConnect or because the independent handset was physically placed on or off hook by the user). You should not send this message for a handset that is connected directly to a telephone line. The mtype field is a constant that specifies whether the handset is connected to the telephone line. The value field is constant that specifies whether the handset is on-hook or off-hook. These constants are described in "Independent Handset States" on page 2-14.
telTermIndHSConnectMsg
Your tool sends this message after an independent handset has been connected or disconnected by the TELSetIndHSConnect function. The mtype field is not used and is always set to 0. The value field is constant that specifies whether the handset is connected to the telephone line. These constants are described in "Independent Handset States" on page 2-14.
telTermKeyImmMsg
Your tool sends this message when a key on an attached telephone set (either on the telephone pad or a feature key) has been pressed. This message is sent to the application's message handler immediately, not at system task time. The mtype field is a constant indicating which kind of key was pressed. The value field is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of these constants.
telTermVolStateMsg
Your tool sends this message when a user mutes a device (such as the handset speaker, handset microphone, or ringer) or turns it back on without changing the volume setting. The mtype field is a constant that indicates which device has had its volume state changed. The value field is a constant that indicates the new state of the device. See "Volume Controls" on page 2-12 for a description of these constants.
telTermOtherMsg
Your tool sends this message when a it needs to send an application some information about the terminal that cannot be provided by the other terminal messages. The values passed in the mtype and value fields are defined by your telephone tool. You should fully describe the supported values in the documentation for your tool.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help